package org.example.code.test2024.eight_mouth;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class test {
    public static void main(String[] args) {
        ShowMeBug account = new ShowMeBug();
        ExecutorService service = Executors.newFixedThreadPool(100);

        for (int i = 1; i <= 100; i++) {
            service.execute(new MoneyThread(account, 1));
        }

        service.shutdown();

        while (!service.isTerminated()) {
        }

        System.out.println("账户金额：" + account.getBalance());
    }
}